package com.example.mybaties.testone.aop.advice;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * 前置增强
 */
public class GreetingBeforeAdvice implements MethodBeforeAdvice {

    private Logger logger = LogManager.getLogger(this.getClass());

    @Override
    public void before(Method method, Object[] args, Object obj) throws Throwable {
        String name = (String) args[0];
        logger.debug("GreetingBeforeAdvice........before..........." + name);
    }
}
